package com.gw.smscheck.service.business.positionInfo.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gw.smscheck.dao.business.positionInfo.PositionAreaMapper;
import com.gw.smscheck.entity.business.positionInfo.PositionArea;
import com.gw.smscheck.service.business.positionInfo.PositionAreaService;
@Service
public class PositionAreaServiceImpl implements PositionAreaService {
	@Autowired
	private PositionAreaMapper positionAreaMapper;
	@Override
	public Integer add(PositionArea positionArea) {
		return positionAreaMapper.add(positionArea);
	}
	@Override
	public List<PositionArea> findAll() {
		return positionAreaMapper.findAll();
	}
	@Override
	public PageInfo<PositionArea> pageSelect(PositionArea dto) {
		PageHelper.startPage(dto.getPage(), dto.getRows(), "create_time desc");// 排序
		List<PositionArea> resultList = positionAreaMapper.pageSelect(dto);
		PageInfo<PositionArea> pageInfo = new PageInfo<>(resultList);
		return pageInfo;
	}
	@Override
	public PositionArea findById(Integer dto) {
		return positionAreaMapper.findById(dto);
	}
	@Override
	public Integer update(PositionArea positionArea) {
		return positionAreaMapper.update(positionArea);
	}
	@Override
	public Integer delByIds(String[] ids) {
		return positionAreaMapper.delByIds(ids);
	}

	@Override
	public PositionArea findByName(String name) {
		return positionAreaMapper.findByName(name);
	}

	@Override
	public List<PositionArea> findAllByParm(PositionArea parm) {
		return positionAreaMapper.findAllByParm(parm);
	}
}

